package com.qfjy.homework.lixuefeng;

public class Test {
    /*
    * 有一个工厂类ConcreteFactory，返回Rectangle对象
    * 两个重载方法，一个是三个参数，分别指定矩形的长宽高
    * 一个是无参数的，默认矩形长宽高为1的正方体
    * */
    public static void main(String[] args) {
        /*
        * 创建工厂类
        *
        *
        * */
        ConcreteFactory concreteFactory = new ConcreteFactory();
        Rectangle rectangle = concreteFactory.factoryMethod();
        Rectangle rectangle1 = concreteFactory.factoryMethod(5, 5, 5);
        System.out.println(rectangle);
        System.out.println(rectangle1);
    }
}
